﻿namespace IQIGame.Onigao.GamePlay
{
    public static class FunctionConverts
    {
        static public FunctionType ConvertByUIHeroInfoType(UIHeroInfoTabType type)
        {
            return type switch
            {
                UIHeroInfoTabType.Equip => FunctionType.Equip,
                UIHeroInfoTabType.UpLevel => FunctionType.HeroUpLv,
                UIHeroInfoTabType.UpStar => FunctionType.HeroUpStar,
                UIHeroInfoTabType.Skill => FunctionType.HeroSkill,
                UIHeroInfoTabType.FateTrajectory => FunctionType.HeroFateTrajectory,
                _ => FunctionType.None,
            };
        }

        static public FunctionType ConvertByUIQuestTabType(UIQuestTabType type)
        {
            return type switch
            {
                UIQuestTabType.All => FunctionType.Quest,
                UIQuestTabType.Main => FunctionType.QuestMain,
                UIQuestTabType.Branch => FunctionType.QuestSide,
                UIQuestTabType.Activity => FunctionType.QuestActivity,
                UIQuestTabType.Achievement => FunctionType.QuestAchievement,
                _ => FunctionType.None,
            };
        }
    }
}
